<html>
<body>

<script>
function showAlert(){
    alert("JavaScript - hello , world !");
}

function showConfirm(){
    confirm("访问 https://blog.csdn.net/zhangphil");
}

function showPrompt(){
    var string=prompt("请输入用户名","用户名");
}
</script>

<button type="button" id="button1" onclick="showAlert()">showAlert</button>
<br>
<button type="button" id="button2" onclick="showConfirm()">showConfirm</button>
<br>
<button type="button" id="button3" onclick="showPrompt()">showPrompt</button>

</body>
</html>